#ifndef __MAT2_H__
#define __MAT2_H__

#include "vec2.h"

namespace libvec
{
  struct dmat2;

  struct mat2
  {
    vec2 v1, v2;

    mat2();
    mat2(dmat2 m);
    mat2(float value);
    mat2(float n11, float n12, float n21, float n22);
    mat2(vec2 v1, vec2 v2);

    vec2 &operator[](int index);

    mat2 operator=(mat2 m);

    bool operator==(mat2 m);
    bool operator!=(mat2 m);

    mat2 &operator+();
    mat2 &operator-();

    mat2 operator+(mat2 m);
    mat2 operator+=(mat2 m);
    mat2 operator-(mat2 m);
    mat2 operator-=(mat2 m);
    vec2 operator*(vec2 v);
    mat2 operator*(mat2 m);
    mat2 operator*=(mat2 m);
    mat2 operator*(float scale);
    mat2 operator*=(float scale);
    mat2 operator/(float scale);
    mat2 operator/=(float scale);
  };
}

#endif /* __MAT2_H__ */
